<?php
/**
 * Created by PhpStorm.
 * User: 丶晓
 * Date: 2017/8/11
 * Time: 10:37
 */

  /*
   * ++++++++++++++++++++++++++++
   * |      公共方法 @Xiao
   * ++++++++++++++++++++++++++++
   */

header('Access-Control-Allow-Origin:*');

/*
 *  截取指定数据内容
 */
function getNeedBetween($kw1, $mark1, $mark2)
{
    $kw = $kw1;
    $kw = '123' . $kw . '123';
    $st = stripos($kw, $mark1);
    $ed = stripos($kw, $mark2);
    if (($st == false || $ed == false) || $st >= $ed)
        return 0;
    $kw = substr($kw, ($st + 1), ($ed - $st - 1));
    return $kw;
}